package com.xzmd.md_city.service.impl;

import com.xzmd.md_city.entity.ProductInfo;
import com.xzmd.md_city.mapper.ProductInfoMapper;
import com.xzmd.md_city.service.ProductInfoService;
import org.apache.ibatis.annotations.CacheNamespace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author:Corday
 * @Date:2021/07/10/20:37
 */
@Service
public class ProductInfoServiceImpl implements ProductInfoService {
    @Resource
    private ProductInfoMapper productInfoMapper;

    @Override
    public List<ProductInfo> findAllProducts() {
        return productInfoMapper.selectAllProducts();
    }

    //id号查商品
    @Override
    public ProductInfo findProductByPid(int pid) {
        return productInfoMapper.selectProudctById(pid);
    }
}
